package flc.ast.adapter;


import android.graphics.Color;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import flc.ast.R;
import flc.ast.bean.HourBean;
import flc.ast.bean.WageBean;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;
import stark.common.basic.adaptermutil.StkSingleSpanProvider;

public class WageAdapter extends StkProviderMultiAdapter<WageBean> {


    public WageAdapter() {
        addItemProvider(new StkSingleSpanProvider(126));
        addItemProvider(new WageProvider());
    }

    private class WageProvider extends BaseItemProvider<WageBean> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_wage;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, WageBean bean) {
            baseViewHolder.setText(R.id.tvWageItemName, bean.getName());
            if (bean.isSelected()) {
                baseViewHolder.setTextColor(R.id.tvWageItemName, Color.parseColor("#5476FC"));
            } else {
                baseViewHolder.setTextColor(R.id.tvWageItemName, Color.parseColor("#000000"));

            }
        }
    }

}
